package game;

import java.util.Random; 
import java.util.Timer;
import java.util.TimerTask;

//make two different AI strategies: SmartAI and DumbAI.  Write using inner classes.  Three classes; AI strategy with one abstract method (get move) 
//and Dumband Smart AI classes. 

public class AI extends Player{
	
	private int aiMove;  
	
	public AI(TicTacToeBoard b) {
		super("AI", b); 
	}
	
	public int getMove(){
		AIStrategy strat = new AIRandomStrategy(gameBoard);
		return strat.getMove(gameBoard); 
	}
	
	public interface AIStrategy{
		
		public int getMove(TicTacToeBoard b); 
		
	}
	
	public class AISmartStrategy implements AIStrategy {
		 
		public AISmartStrategy(TicTacToeBoard b){
			
		}
		
		public int getMove(TicTacToeBoard b){
			return 1; 
		}
	}
	
	public class AIRandomStrategy implements AIStrategy {
		
		public AIRandomStrategy(TicTacToeBoard b){
			
		}
		
		public int getMove(TicTacToeBoard b){
			Random generator = new Random(); 
			aiMove = generator.nextInt(8); 
			return aiMove;
		}
	}
}

